<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0038)http://www.powervb.com/corrections.htm --><HTML><HEAD><TITLE>PowerVB Corrections</TITLE>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content=none name="Microsoft Border">
<META content=none name="Microsoft Theme">
<META content="MSHTML 5.50.4207.2601" name=GENERATOR></HEAD>
<BODY bgColor=#ffffff background="">
<P align=left><A href="http://www.powervb.com/default.htm"><FONT face=Tahoma 
size=4>PowerVB.com Home<STRONG></A><BR></STRONG></FONT></P>
<H1>Corrections</H1>
<HR>

<P><B>Page 6</B> <PRE><I>'Equivalent to Long<FONT color=gray><STRIKE>1</STRIKE></FONT><FONT color=red>2</FONT> = Long<FONT color=gray><STRIKE>2</STRIKE></FONT><FONT color=red>1</FONT></I>
</PRE>
<P></P>
<P><B>Page 7</B> <PRE><B>Dim</B> String1 <B>As String</B>
<B>Dim</B> String2 <B>As String</B>
<B>Dim</B> pString1 <B>As Long</B>
    String1 = "PowerVB"
    String2 = String$(7, 0)
    <I>'These four operations all do the same thing</I>

    <I>'Try one: this requires a typelib CopyMemory declare</I>
    CopyMemory <B><FONT color=red>ByVal</FONT></B> String2, <B><FONT color=red>ByVal</FONT></B> String1, 14

    <I>'Try two: Use StrPtr to guarantee no ANSI/UNICODE munging</I>
    CopyMemory <B>ByVal</B> StrPtr(String2), <B>ByVal</B> StrPtr(String1), 14

    <I>'Try three: Get the string's pointer from VarPtr</I>
    CopyMemory pString1, <B>ByVal</B> VarPtr(String1), 4
    CopyMemory <B><FONT color=red>ByVal</FONT></B> String2, <B>ByVal</B> pString1, 14

    <I>'Try four: Demonstrate VBoost.Assign instead</I>
    VBoost.Assign pString1, <B>ByVal</B> VarPtr(String1)
    CopyMemory <B><FONT color=red>ByVal</FONT></B> String2, <B>ByVal</B> pString1, 14
</PRE>
<P></P>
<P><B>Page 20</B> <PRE><I>'Output (Intel uses <FONT color=gray><STRIKE>big</STRIKE></FONT><FONT color=red>little</FONT>-endian integer layout)</I>
</PRE>
<P></P>
<P><B>Page 39</B> <BR>You can also calculate the element <FONT 
color=gray><STRIKE>count</STRIKE></FONT><FONT color=red>size</FONT> by using the 
formula VBoost.UDif(VarPtr(<FONT color=red>elem(</FONT>1<FONT 
color=red>)</FONT>), VarPtr(<FONT color=red>elem(</FONT>0<FONT 
color=red>)</FONT>)). <BR><BR>SafeArrays use a <FONT 
color=gray><STRIKE>row</STRIKE></FONT><FONT color=red>column</FONT>-major 
layout, unlike C++, which uses a <FONT 
color=gray><STRIKE>column</STRIKE></FONT><FONT color=red>row</FONT>-major 
layout. </P>
<P><B>Page 40</B> <BR>SafeArrayCreate takes an array of SafeArrayBound elements 
in <FONT color=gray><STRIKE>row</STRIKE></FONT><FONT 
color=red>column</FONT>-major (VB) order, but the descriptor itself stores the 
list in reverse order, which is really <FONT 
color=gray><STRIKE>column</STRIKE></FONT><FONT color=red>row</FONT>-major (C++) 
order. </P>
<P><B>Page 43</B> <BR>Second, <FONT color=red>if a reference</FONT> supports an 
IID, the same IID must be supported by all references that the object returns. 
</P>
<P><B>Page 98</B> <BR><B>The native interfaces supported by Class2 are not 
wrapped, and the _Class1 interface supported by <FONT 
color=gray><STRIKE>_</STRIKE></FONT>Class1 is wrapped with a blind delegator 
that makes it act like a native part of Class<FONT 
color=gray><STRIKE>1</STRIKE></FONT><FONT color=red>2</FONT>.</B> </P>
<P><B>Page 154</B> <PRE>    <B>If</B> m_PrevCursor <FONT color=red>&lt;&gt;</FONT> vbHourGlass <B>Then</B>
</PRE>
<P></P>
<P><B>Page 157</B> <PRE>            <FONT color=gray><STRIKE>.pVTable</STRIKE></FONT><FONT color=red>m_pVTable</FONT> = VarPtr(.VTable(0))
</PRE>
<P></P>
<P><B>Page 158</B> <PRE>    StringFromGUID2 pguid, <FONT color=gray><STRIKE>StrPtr(</STRIKE></FONT>GuidString<FONT color=gray><STRIKE>)</STRIKE></FONT>
</PRE>
<P></P>
<P><B>Page 239</B> <PRE>    QuickSort VarPtr(<FONT color=red>Strings</FONT>(<B>LBound(</B>Strings<B>)</B>), _
      <B>UBound(</B>Strings<B>)</B> - <B>LBound(</B>Strings<B>)</B> + 1, _
      4, <B>AddressOf</B> CompareStrings
</PRE>
<P></P>
<P><B>Page 374</B> <PRE>        <B>For</B> iFields = 0 <B>To</B> _
                   .TokenizeLine<FONT color=gray><STRIKE>s</STRIKE></FONT>(strLine, iStoppedAt, strFields) - 1
</PRE>
<P></P></BODY></HTML>
